package lv.solcraft.replication.client;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
import org.springframework.context.ApplicationContext;

public class ReplicationExecuteJob implements StatefulJob {

    public void execute(JobExecutionContext jobContext) throws JobExecutionException {
        ApplicationContext context = (ApplicationContext) jobContext.getJobDetail().getJobDataMap().get("context");
        OperReceiver session = (OperReceiver) context.getBean("operReceiver");
        session.execute();
    }
}
